home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / planetkit / amigaexe / irc / rexx / wallchop.amirx < prev   
Text File  |  1996-03-28  |  984b  |  43 lines

  1. /* WallChop.AMIRX -- Write a message to all channel operators on a channel
  2. \\ written by Oliver Wagner
  3. // UPDATED BY TROY "DOOGIE" DAVIS (DOOGIE@WSP1.WSPICE.COM), WHO IS
  4. \\ TYPING IN ALL CAPS BECAUSE A CERTAIN HACK MUI PROGRAMMER SEEMED
  5. // TO "FORGET" ABOUT HIS CONTRIBUTION.  ;^)
  6. \\
  7. //
  8. \\ Put this script in PROGDIR:rexx/ and add this as an alias with the
  9. // command:  "/alias wallchop /rx wallchop %p"
  10. \\
  11. */
  12.  
  13. parse arg args
  14. options results
  15.  
  16. if args = "" then do
  17.    "echo P="d2c(27)"b«Error»" Usage: WALLCHOP text"
  18.    exit
  19. end
  20.  
  21. ops = ""
  22. getmynick
  23. mynick = RESULT
  24. getchannel
  25. channel = RESULT
  26.  
  27. namevalid = 0
  28. count = 0
  29. do while namevalid = 0
  30.    getuserstate count
  31.    if rc = 5 then break
  32.    if rc = 1 then do
  33.       getuser count
  34.       nick = RESULT
  35.       if nick ~= mynick then do
  36.          ops = ops nick
  37.          "RAW PRIVMSG "nick" :"d2c(2)"[WallChop/"channel"]"d2c(2) ARGS
  38.       end
  39.    end
  40.    count = count + 1
  41. end
  42. "echo P="d2c(27)"b«WallChop» WallChop message sent to:  "strip(ops)
  43.